// import { createRouter, createWebHashHistory } from "vue-router";

// import Home from "./components/Home.vue"
// import Blog from "./components/Blog.vue"

// const router = createRouter({
//     history: createWebHashHistory(),
//     routers: [{
//         path: "/",
//         components: Home
//     },{
//         path:"/Blog",
//         components:Blog
//     }]
// });
// export default router;
// vue3 创建路由
import { createWebHistory, createRouter } from 'vue-router'
import Admin from '@/components/admin/Admin.vue'
//学生课程表
import Curriculum from '@/components/student/Curriculum.vue'
import JobManagement from '@/components/student/JobManagement.vue'
// 作业管理的3个组件
import JobTasks from '@/components/student/job-management/JobTasks.vue'
import StudentAnswer from '@/components/student/job-management/StudentAnswer.vue'
import TeacheApproval from '@/components/student/job-management/TeacheApproval.vue'

const router = createRouter({
  history: createWebHistory(), //hash模式：createWebHashHistory，history模式：createWebHistory
  routes: [
    {
      path: '/',
      components: {

      }
    },
    {
      path: '/admin',
      name: Admin,
      component: Admin,
    },
    // 课程表学生
    {
      path: '/curriculum',
      name: Curriculum,
      component: Curriculum,
    },
    // 学生的作业管理
    {
      path: '/jobManagement',
      name: JobManagement,
      component: JobManagement,
      children: [{
        path: "jobTasks",
         name: JobTasks,
        component: JobTasks,
      },
      {
        path: 'studentAnswer',
        name: StudentAnswer,
        component: StudentAnswer,
      }, {
        path: 'teacheApproval',
        name: TeacheApproval,
        component: TeacheApproval,
      },
      ]
    },


    // {
    //   path: '/blog',
    //   name: Blog,
    //   component: Blog, 
    // },
    // {
    //   path: "/plen",
    //   component: Plen,
    //   children: [{
    //   path: "Blog",
    //   component: Blog,
    // }]
    // }
  ]
})

export default router

